﻿<%@ page contentType="text/html; charset=utf-8" language="java" import="java.sql.*" errorPage="" %>
<%@ include file="../Connections/test.jsp" %>
<%
  Driver DriverRecordset2 = (Driver) Class.forName(MM_test_DRIVER).newInstance();
  Connection ConnRecordset2 = DriverManager.getConnection(MM_test_STRING, MM_test_USERNAME, MM_test_PASSWORD);
  PreparedStatement StatementRecordset2 = ConnRecordset2.prepareStatement("SELECT *  FROM shengwuyixue.article  WHERE shengwuyixue.article.degree='bo'  ORDER BY graduate_year DESC");
  ResultSet Recordset2 = StatementRecordset2.executeQuery();
  boolean Recordset2_isEmpty = !Recordset2.next();
  boolean Recordset2_hasData = !Recordset2_isEmpty;
  Object Recordset2_data;
  int Recordset2_numRows = 0;
%>
<%
  int Repeat1__numRows = 25;
  int Repeat1__index = 0;
  Recordset2_numRows += Repeat1__numRows;
%>
<%
  // *** Recordset Stats, Move To Record, and Go To Record: declare stats variables

  int Recordset2_first = 1;
  int Recordset2_last = 1;
  int Recordset2_total = -1;

  if (Recordset2_isEmpty) {
    Recordset2_total = Recordset2_first = Recordset2_last = 0;
  }

//set the number of rows displayed on this page
  if (Recordset2_numRows == 0) {
    Recordset2_numRows = 1;
  }
%>
<% String MM_paramName = ""; %>
<%
  // *** Move To Record and Go To Record: declare variables

  ResultSet MM_rs = Recordset2;
  int MM_rsCount = Recordset2_total;
  int MM_size = Recordset2_numRows;
  String MM_uniqueCol = "";
  MM_paramName = "";
  int MM_offset = 0;
  boolean MM_atTotal = false;
  boolean MM_paramIsDefined = (MM_paramName.length() != 0 && request.getParameter(MM_paramName) != null);
%>
<%
  // *** Move To Record: handle 'index' or 'offset' parameter

  if (!MM_paramIsDefined && MM_rsCount != 0) {

    //use index parameter if defined, otherwise use offset parameter
    String r = request.getParameter("index");
    if (r == null) r = request.getParameter("offset");
    if (r != null) MM_offset = Integer.parseInt(r);

    // if we have a record count, check if we are past the end of the recordset
    if (MM_rsCount != -1) {
      if (MM_offset >= MM_rsCount || MM_offset == -1) {  // past end or move last
        if (MM_rsCount % MM_size != 0)    // last page not a full repeat region
          MM_offset = MM_rsCount - MM_rsCount % MM_size;
        else
          MM_offset = MM_rsCount - MM_size;
      }
    }

    //move the cursor to the selected record
    int i;
    for (i = 0; Recordset2_hasData && (i < MM_offset || MM_offset == -1); i++) {
      Recordset2_hasData = MM_rs.next();
    }
    if (!Recordset2_hasData) MM_offset = i;  // set MM_offset to the last possible record
  }
%>
<%
  // *** Move To Record: if we dont know the record count, check the display range

  if (MM_rsCount == -1) {

    // walk to the end of the display range for this page
    int i;
    for (i = MM_offset; Recordset2_hasData && (MM_size < 0 || i < MM_offset + MM_size); i++) {
      Recordset2_hasData = MM_rs.next();
    }

    // if we walked off the end of the recordset, set MM_rsCount and MM_size
    if (!Recordset2_hasData) {
      MM_rsCount = i;
      if (MM_size < 0 || MM_size > MM_rsCount) MM_size = MM_rsCount;
    }

    // if we walked off the end, set the offset based on page size
    if (!Recordset2_hasData && !MM_paramIsDefined) {
      if (MM_offset > MM_rsCount - MM_size || MM_offset == -1) { //check if past end or last
        if (MM_rsCount % MM_size != 0)  //last page has less records than MM_size
          MM_offset = MM_rsCount - MM_rsCount % MM_size;
        else
          MM_offset = MM_rsCount - MM_size;
      }
    }

    // reset the cursor to the beginning
    Recordset2.close();
    Recordset2 = StatementRecordset2.executeQuery();
    Recordset2_hasData = Recordset2.next();
    MM_rs = Recordset2;

    // move the cursor to the selected record
    for (i = 0; Recordset2_hasData && i < MM_offset; i++) {
      Recordset2_hasData = MM_rs.next();
    }
  }
%>
<%
  // *** Move To Record: update recordset stats

// set the first and last displayed record
  Recordset2_first = MM_offset + 1;
  Recordset2_last = MM_offset + MM_size;
  if (MM_rsCount != -1) {
    Recordset2_first = Math.min(Recordset2_first, MM_rsCount);
    Recordset2_last = Math.min(Recordset2_last, MM_rsCount);
  }

// set the boolean used by hide region to check if we are on the last record
  MM_atTotal = (MM_rsCount != -1 && MM_offset + MM_size >= MM_rsCount);
%>
<%
  // *** Go To Record and Move To Record: create strings for maintaining URL and Form parameters

  String MM_keepBoth, MM_keepURL = "", MM_keepForm = "", MM_keepNone = "";
  String[] MM_removeList = {"index", MM_paramName};

// create the MM_keepURL string
  if (request.getQueryString() != null) {
    MM_keepURL = '&' + request.getQueryString();
    for (int i = 0; i < MM_removeList.length && MM_removeList[i].length() != 0; i++) {
      int start = MM_keepURL.indexOf(MM_removeList[i]) - 1;
      if (start >= 0 && MM_keepURL.charAt(start) == '&' &&
          MM_keepURL.charAt(start + MM_removeList[i].length() + 1) == '=') {
        int stop = MM_keepURL.indexOf('&', start + 1);
        if (stop == -1) stop = MM_keepURL.length();
        MM_keepURL = MM_keepURL.substring(0, start) + MM_keepURL.substring(stop);
      }
    }
  }

// add the Form variables to the MM_keepForm string
  if (request.getParameterNames().hasMoreElements()) {
    java.util.Enumeration items = request.getParameterNames();
    while (items.hasMoreElements()) {
      String nextItem = (String) items.nextElement();
      boolean found = false;
      for (int i = 0; !found && i < MM_removeList.length; i++) {
        if (MM_removeList[i].equals(nextItem)) found = true;
      }
      if (!found && MM_keepURL.indexOf('&' + nextItem + '=') == -1) {
        MM_keepForm = MM_keepForm + '&' + nextItem + '=' + java.net.URLEncoder.encode(request.getParameter(nextItem));
      }
    }
  }

  String tempStr = "";
  for (int i = 0; i < MM_keepURL.length(); i++) {
    if (MM_keepURL.charAt(i) == '<') tempStr = tempStr + "&lt;";
    else if (MM_keepURL.charAt(i) == '>') tempStr = tempStr + "&gt;";
    else if (MM_keepURL.charAt(i) == '"') tempStr = tempStr + "&quot;";
    else tempStr = tempStr + MM_keepURL.charAt(i);
  }
  MM_keepURL = tempStr;

  tempStr = "";
  for (int i = 0; i < MM_keepForm.length(); i++) {
    if (MM_keepForm.charAt(i) == '<') tempStr = tempStr + "&lt;";
    else if (MM_keepForm.charAt(i) == '>') tempStr = tempStr + "&gt;";
    else if (MM_keepForm.charAt(i) == '"') tempStr = tempStr + "&quot;";
    else tempStr = tempStr + MM_keepForm.charAt(i);
  }
  MM_keepForm = tempStr;

// create the Form + URL string and remove the intial '&' from each of the strings
  MM_keepBoth = MM_keepURL + MM_keepForm;
  if (MM_keepBoth.length() > 0) MM_keepBoth = MM_keepBoth.substring(1);
  if (MM_keepURL.length() > 0) MM_keepURL = MM_keepURL.substring(1);
  if (MM_keepForm.length() > 0) MM_keepForm = MM_keepForm.substring(1);
%>
<%
  // *** Move To Record: set the strings for the first, last, next, and previous links

  String MM_moveFirst, MM_moveLast, MM_moveNext, MM_movePrev;
  {
    String MM_keepMove = MM_keepBoth;  // keep both Form and URL parameters for moves
    String MM_moveParam = "index=";

    // if the page has a repeated region, remove 'offset' from the maintained parameters
    if (MM_size > 1) {
      MM_moveParam = "offset=";
      int start = MM_keepMove.indexOf(MM_moveParam);
      if (start != -1 && (start == 0 || MM_keepMove.charAt(start - 1) == '&')) {
        int stop = MM_keepMove.indexOf('&', start);
        if (start == 0 && stop != -1) stop++;
        if (stop == -1) stop = MM_keepMove.length();
        if (start > 0) start--;
        MM_keepMove = MM_keepMove.substring(0, start) + MM_keepMove.substring(stop);
      }
    }

    // set the strings for the move to links
    StringBuffer urlStr = new StringBuffer(request.getRequestURI()).append('?').append(MM_keepMove);
    if (MM_keepMove.length() > 0) urlStr.append('&');
    urlStr.append(MM_moveParam);
    MM_moveFirst = urlStr + "0";
    MM_moveLast = urlStr + "-1";
    MM_moveNext = urlStr + Integer.toString(MM_offset + MM_size);
    MM_movePrev = urlStr + Integer.toString(Math.max(MM_offset - MM_size, 0));
  }
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  <title>北京交通大学计算机与信息技术学院生物医学工程系</title>
  <link href="<%=request.getContextPath()%>/include/css/css.css" rel="stylesheet" type="text/css"/>
  <style type="text/css">
    <!--
    .STYLE1 {
      font-size: 16px;
      font-weight: bold;
    }

    .STYLE3 {
      font-size: 18px;
      font-weight: bold;
    }

    .STYLE5 {
      font-size: 16px
    }

    .STYLE6 {
      font-size: 16;
      font-weight: bold;
      color: #FFFFFF;
    }

    -->
  </style>
</head>
<body>
<div class="zhong">

  <jsp:include page="/include/banner.jsp"/>
  <jsp:include page="/include/menu.jsp"/>

  <div class="main">
    <div class="left">
      <div class="box_1">
        <div class="left_title STYLE1">基本概况</div>
        <div class="left_news">
          <ul>
            <li><a href="jiaoxue_laberatory.jsp" class="hover">教学实验室</a></li>
            <li><a href="research_laberatory.jsp">科研实验室</a></li>
            <li><a href="artilce_bachelor.jsp">学士毕业论文</a></li>
            <li><a href="artilce_master.jsp">硕士毕业论文</a></li>
            <li><a href="artilce_doctor.jsp">博士毕业论文</a></li>


          </ul>
        </div>
      </div>


    </div>
    <div class="right">
      <div class="right_title STYLE5">
        <p>博士毕业论文一览</p>
        <p>&nbsp;</p>
        <hr/>
        <p>&nbsp;</p>
        <p>&nbsp;</p>


        <table width="100%" border="0" bordercolor="#CCCCCC">

          <tr>
            <td width="24%">
              <div align="left">姓名</div>
            </td>
            <td width="28%">
              <div align="left">毕业时间</div>
            </td>
            <td width="24%">
              <div align="left">论文</div>
            </td>
            <td width="24%">
              <div align="center">操作
              </div>
              <div align="left"></div>
            </td>
          </tr>
          <% while ((Recordset2_hasData) && (Repeat1__numRows-- != 0)) { %>
          <tr>
            <td height="25">
              <div
                  align="left"><%=(((Recordset2_data = Recordset2.getObject("author")) == null || Recordset2.wasNull()) ? "" : Recordset2_data)%>
              </div>
            </td>
            <td bordercolor="#999999">
              <div
                  align="left"><%=(((Recordset2_data = Recordset2.getObject("graduate_year")) == null || Recordset2.wasNull()) ? "" : Recordset2_data)%>
              </div>
            </td>
            <td>
              <div
                  align="right"><%=(((Recordset2_data = Recordset2.getObject("title")) == null || Recordset2.wasNull()) ? "" : Recordset2_data)%>
              </div>
            </td>
            <td align="right" valign="middle"><A
                HREF="artile_doctorDetail.jsp?<%= MM_keepNone + ((MM_keepNone!="")?"&":"") + "articleID=" + (((Recordset2_data = Recordset2.getObject("articleID"))==null || Recordset2.wasNull())?"":Recordset2_data) %>">查看详细</A>
              <div align="center"></div>
            </td>
          </tr>
          <%
              Repeat1__index++;
              Recordset2_hasData = Recordset2.next();
            }
          %>
        </table>
        <p>&nbsp;</p>
        <p>&nbsp;</p>


        <table border="0" width="50%" align="center">
          <tr>
            <td width="23%" align="center"><% if (MM_offset != 0) { %>
              <a href="<%=MM_moveFirst%>">First</a>
              <% } /* end MM_offset != 0 */ %>
            </td>
            <td width="31%" align="center"><% if (MM_offset != 0) { %>
              <a href="<%=MM_movePrev%>">Previous</a>
              <% } /* end MM_offset != 0 */ %>
            </td>
            <td width="23%" align="center"><% if (!MM_atTotal) { %>
              <a href="<%=MM_moveNext%>">Next</a>
              <% } /* end !MM_atTotal */ %>
            </td>
            <td width="23%" align="center"><% if (!MM_atTotal) { %>
              <a href="<%=MM_moveLast%>">Last</a>
              <% } /* end !MM_atTotal */ %>
            </td>
          </tr>
        </table>
        <p>&nbsp;</p>
        <p>&nbsp;</p>
      </div>
    </div>
    <!--这里是链接模块,已删除，可自行添加-->
    <div class="clear"></div>
    <div class="clear"></div>
  </div>


  <div class="clear"></div>
</div>
<div class="bottom">
  <p>地址：北京市海淀区上园村3号北京交通大学信息中心　邮编：100044　 </p>
  <p>北京交通大学计算机与信息技术学院生物医学工程系保留网站所有权利</p>
  <p> 未经允许不得复制、镜像</p>
  <p>京公网安备：110402430059 号</p>
  <br/>
  版权所有&copy;ouchanghai,cit.bjtu.
</div>
</div>
<script src="<%=request.getContextPath()%>/include/js/meun.js" type="text/javascript"></script>
</body>
</html>
<%
  Recordset2.close();
  StatementRecordset2.close();
  ConnRecordset2.close();
%>
